package com.ucode.model.cgms.form;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * 佣金流水表单
 * @Author: Claude
 * @Date: 2023/05/26 13:40
 * @Version: 1.0
 */
@Schema(description = "佣金流水表单")
@Data
public class CgmsCommissionFlowForm {

    /**
     * 用户ID
     */
    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    /**
     * 订单ID
     */
    @Schema(description = "订单ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单ID不能为空")
    private Long orderId;

    /**
     * 订单金额
     */
    @Schema(description = "订单金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单金额不能为空")
    @DecimalMin(value = "0.01", message = "订单金额必须大于0")
    private BigDecimal orderAmount;

    /**
     * 佣金金额
     */
    @Schema(description = "佣金金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "佣金金额不能为空")
    @DecimalMin(value = "0.01", message = "佣金金额必须大于0")
    private BigDecimal amount;
    
    /**
     * 佣金类型(1-陪玩订单佣金 2-俱乐部佣金)
     */
    @Schema(description = "佣金类型(1-陪玩订单佣金 2-俱乐部佣金)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "佣金类型不能为空")
    @Min(value = 1, message = "佣金类型无效")
    @Max(value = 2, message = "佣金类型无效")
    private Integer commissionType;
    
    /**
     * 佣金模式(1-返点 2-抽成)
     */
    @Schema(description = "佣金模式(1-返点 2-抽成)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "佣金模式不能为空")
    @Min(value = 1, message = "佣金模式无效")
    @Max(value = 2, message = "佣金模式无效")
    private Integer commissionMode;
    
    /**
     * 返点金额
     */
    @Schema(description = "返点金额")
    private BigDecimal returnPointAmount;
    
    /**
     * 抽成金额
     */
    @Schema(description = "抽成金额")
    private BigDecimal commissionAmount;
    
    /**
     * 状态(0-待结算 1-已结算 2-已取消)
     */
    @Schema(description = "状态(0-待结算 1-已结算 2-已取消)")
    private Integer statuz;
    
    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
} 